package com.ipay.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.ipay.entity.TPayresultEntity;
import com.ipay.entity.TradeRecord;

public interface TradeRecordService {

	void save(TradeRecord payorder);
	/**
	 * 查找交易流水列表
	 *
	 * @param map
	 * @return
	 */
	List<TradeRecord> findTradeRecordList(Map<String, Object> map);
	/**
	 * 查找交易流水列表
	 *
	 * @param map
	 * @return
	 */
	List<TradeRecord> findTkTradeRecordList(Map<String, Object> map);

	TradeRecord findTradeRecordDetails(String recordNo);

	TradeRecord queryByRecordNo(String recordNo);

	/**
	 * 收款单日期分组+交易金额统计+交易数据统计....
	 * @return
	 */
	List<Map<String, Object>> findDateGrouping(TradeRecord payorder);
	/**
	 * 收款单日期分组
	 * @return
	 */
	List<Map<String, Object>> findOrderDateStatistics(TradeRecord payorder);
	/**
	 * 收款单日期分组
	 * @return
	 */
	List<Map<String, Object>> findDateGroupingSX(TradeRecord payorder);
	/**
	 * 收款员数据查询
	 * @return
	 */
	List<Map<String, Object>> findDateGroupingSKY(TradeRecord payorder);
	/**
	 * 查找交易流水列表
	 * 
	 * @param payorder
	 * @return
	 */
	List<TradeRecord> findTradeRecordPage(TradeRecord payorder);
	/**
	 * 查询当天订单总金额
	 * @param map
	 * @return
	 */
	BigDecimal findTodaySumAmount(Map<String, Object> map);
	/**
	 * 今日某个商户交易金额
	 * @param map
	 * @return
	 */
	BigDecimal findTodaySumAmountByBusId(Map<String, Object> map);
	/**
	 * 查询某个订单退款总金额
	 * @param map
	 * @return
	 */
	BigDecimal findRefundSumAmount(Map<String, Object> map);
	/**
	 * 查询成功订单总数
	 * @param map
	 * @return
	 */
	Integer findCountRecord(Map<String, Object> map);
	
	/***
	 *  收款员交易数据导出Excel
	 * zhenliu 2017-10-23
	 */
	public void exportExcel(String[] produceTitle,String file, List produceList);

	/**
	 * 查询商户30天或7天以内的交易金额
	 * @param payorder
	 * @return
	 */
	List<TradeRecord> findSumAmountByDate(TradeRecord payorder);
	
}
